package com.hfengxiang.example.canvasrotatedemo;

import android.graphics.PointF;

public class RotateInfo {
    private float progress;
    private float scale;
    private float totalDegree;
    private float deltaDegree;
    private float currentDegree;
    private PointF rotateCenter;
    private boolean isRotating;
    private boolean isRecovering;

    public float getDeltaDegree() {
        return deltaDegree;
    }

    public RotateInfo setDeltaDegree(float deltaDegree) {
        this.deltaDegree = deltaDegree;
        return this;
    }

    public RotateInfo() {
        rotateCenter = new PointF();
    }

    public float getProgress() {
        return progress;
    }

    public RotateInfo setProgress(float progress) {
        this.progress = progress;
        return this;
    }

    public float getScale() {
        return scale;
    }

    public RotateInfo setScale(float scale) {
        this.scale = scale;
        return this;
    }

    public float getTotalDegree() {
        return totalDegree;
    }

    public RotateInfo setTotalDegree(float totalDegree) {
        this.totalDegree = totalDegree;
        return this;
    }

    public float getCurrentDegree() {
        return currentDegree;
    }

    public RotateInfo setCurrentDegree(float currentDegree) {
        this.currentDegree = currentDegree;
        return this;
    }

    public boolean isRotating() {
        return isRotating;
    }

    public RotateInfo setRotating(boolean rotating) {
        isRotating = rotating;
        return this;
    }

    public boolean isRecovering() {
        return isRecovering;
    }

    public RotateInfo setRecovering(boolean recovering) {
        isRecovering = recovering;
        return this;
    }

    public PointF getRotateCenter() {
        return rotateCenter;
    }

    public RotateInfo setRotateCenter(float x, float y) {
        this.rotateCenter.set(x,y);
        return this;
    }

    public void reset() {
        setRotating(false)
                .setRecovering(false)
                .setRotateCenter(0,0);
    }
}
